package com.omega_r.libs.omegarecyclerview.viewpager.default_transformers;

import com.omega_r.libs.omegarecyclerview.viewpager.NumberUtil;
import ohos.agp.components.Component;

public class AccordionTransformer extends ABaseTransformer {

    @Override
    public void onTransform(Component component, float position) {
        component.setPivotX(position < (float) 0 ? 0.0F : (float) component.getWidth());
        component.setScaleX(position < (float) 0 ? NumberUtil.plus(1.0F, position) : NumberUtil.sub(1.0F, position));
    }
}
